import cn from "@/utils/classnames";
import { ScrollView, View, Text } from "@tarojs/components";
import Taro from "@tarojs/taro";
import { useToggle } from "ahooks";
import React, { FC, useState } from "react";
import styles from "./index.module.scss";
interface P {}
const SchoolView: FC<P> = props => {
  let [visible, { toggle }] = useToggle();
  return (
    <View className={styles.wrap}>
      <View className={styles.up}>
        <View className={cn("flex", styles.headerUp)}>
          <View className={cn(styles.upLeft, "flex-1")}>
            <View className={styles.text1}>安海军官大学</View>
            <View className={styles.text2}>
              <Text className={styles.item}>军队“2110工程”重点建设学校</Text>
              <Text className={styles.item}>211</Text>
            </View>
            <View className={styles.text3}>重庆 本科普通批 综合</View>
          </View>
          <View className={cn(styles.upRight, "flex-none")}>
            <View className={cn(styles.likeWrap, "flex-center")}></View>
            <View className={cn(styles.compareWrap, "flex-center")}></View>
          </View>
        </View>
        <View className={cn(styles.bodyUp, "flex-center")}>
          <View className={styles.bodyUpLeft}>
            <View className={styles.cell}>
              <View className={styles.cellItem}>
                排名：<Text className={styles.red}>29</Text>
              </View>
              <View className={styles.cellItem}>
                省排名：<Text className={styles.red}>29</Text>
              </View>
            </View>
            <View className={styles.cell}>
              <View className={styles.cellItem}>
                招生数：<Text className={styles.blue}>29</Text>
              </View>
              <View className={styles.cellItem}>
                平均分：<Text className={styles.blue}>29</Text>
              </View>
            </View>
            <View className={styles.cell}>
              <View className={styles.cellItem}>
                最低分：<Text className={styles.blue}>29</Text>
              </View>
              <View className={styles.cellItem}>
                最低位次：<Text className={styles.blue}>29</Text>
              </View>
            </View>
          </View>
          <View className={styles.bodyUpLine}></View>
          <View
            className={cn(styles.bodyUpRight, "flex-center")}
            onClick={() => {
              toggle();
            }}
          >
            专业(20)^
          </View>
        </View>
      </View>
      {visible && (
        <View className={styles.down}>
          {[1, 2, 3, 4].map(i => (
            <View className={styles.downCell}>
              <View className={styles.downCellTitle}>生物医学工程类(生物与药学)</View>
              <View className={styles.downCellBody}>
                <View className={styles.downCellBodyLeft}>招录人数：--</View>
                <View className={styles.downCellBodyRight}>
                  最低分/位次：<Text className={styles.red}>29</Text>
                  <Text className={styles.blue}>/29</Text>
                </View>
              </View>
            </View>
          ))}
        </View>
      )}
    </View>
  );
};

export default SchoolView;
